package com.huang.juctool.CountDown;


import lombok.Getter;

public enum Enum {

    ONE(1,"小明"),
    TWO(2,"小红"),
    THREE(3,"小刘");

 @Getter  private String name;
 @Getter private Integer reindex;



    Enum(Integer reindex, String name) {
        this.reindex = reindex;
        this.name = name;
    }

    public static Enum getInstance(Integer reindex){
        for (Enum value : Enum.values()) {
            if(reindex==value.getReindex()){
                return value;
            }
        }

        return null;
    }
}
